package com.lqh.studyproject.springbootdemo;

import com.lqh.studyproject.springbootdemo.api.PersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName TestController
 * @Description studyproject
 * @Author bgy-lqh
 * @Date 2020/6/29 16:58
 * @Version 控制器
 **/
@RestController
public class TestController {
    @Autowired
    private PersonService studentService;

    @Autowired
    private PersonService teacherService;

    @GetMapping("/hello")
    public String hello(@RequestParam(name = "name") String name) {
        return studentService.hello(name) + "=======>" + teacherService.hello(name);
    }
}